package prototype;

import java.util.ArrayList;
import java.util.List;

public class MainTest4 {
    public static void main(String[] args) {
        List<String> friend1 = new ArrayList<String>() {{
            add("mao");
        }};
        Person person1 = new Person();
        person1.setName("tom");
        person1.setAge(30);
        person1.setSex("male");
        person1.setFriends(friend1);

        Person person2 = person1.clone();
        person2.setName("john");
        friend1.add("mao1");
        System.out.println(person1 == person2);
        System.out.println(person1);
        System.out.println(person2);
    }
}
